package Test4;
import java.util.Comparator;

public class TeamComparator {
	public static Comparator<Team> byPoint(){
		return new Comparator<Team>(){
			public int compare(Team emp1, Team emp2) {
				int result = Integer.toString(emp2.getPoint()).compareTo(Integer.toString(emp1.getPoint()));
				if(result==0){
					result = Integer.toString(emp2.getDifGoalCon()).compareTo(Integer.toString(emp1.getDifGoalCon()));
				}
				return result;
			}
		};
	}
}
